﻿using AutoMapper;
using OrderMicroService.Application.DTO;
using OrderMicroService.Domain.Domain.Entity;
using OrderMicroService.Types.Types;

namespace OrderMicroService.Application.Assembler.MapperProfile
{
    public class OrderMapperProfile : Profile
    {
        public OrderMapperProfile()
        {
            CreateMap<OrderDetailDTO, Order>()
            .ForMember(result => result.OrderId, opt => opt.MapFrom(src => new OrderId(src.OrderId)));
        }
    }
}